package com.zb.internetSpider.gui.splitPanel;

import java.awt.Color;
import java.awt.Font;
import java.util.ArrayList;

import org.springframework.stereotype.Component;

import com.zb.internetSpider.gui.SpiderComponent;
import com.zb.internetSpider.gui.SpiderContainer;
import com.zb.internetSpider.gui.asiderPanel.AbstractSpiderAsiderPanel;
import com.zb.internetSpider.gui.mainPanel.AbstractSpiderMainPanel;

@Component
public class DefaultSpiderSplitPane extends AbstractSpiderSplitPane {
	/**
	 * 
	 */
	private static final long serialVersionUID = -4646359809271376175L;

	
	public DefaultSpiderSplitPane(AbstractSpiderAsiderPanel asiderPanel, AbstractSpiderMainPanel spiderContentPanel) {
		// TODO Auto-generated constructor stub
	}


	@Override
	public void setSpiderContainers(SpiderContainer... containers) {
		// TODO Auto-generated method stub
		
	}


	@Override
	public void setSpiderComponents(SpiderComponent... components) {
		// TODO Auto-generated method stub
		
	}


	@Override
	public SpiderContainer[] getSpiderContainers() {
		// TODO Auto-generated method stub
		return null;
	}


	@Override
	public SpiderComponent[] getSpiderComponents() {
		// TODO Auto-generated method stub
		return null;
	}


	@Override
	public int SpiderContainersCount() {
		// TODO Auto-generated method stub
		return 0;
	}


	@Override
	public int SpiderComponentsCount() {
		// TODO Auto-generated method stub
		return 0;
	}


	@Override
	public void setFont(Font font, Color color) {
		// TODO Auto-generated method stub
		
	}
	
	@Override
	public void addSpiderContainer(SpiderContainer... containers) {
		// TODO Auto-generated method stub
		
		if(this.containers == null){
			this.containers = new ArrayList<SpiderContainer>();
		}
		
		for(SpiderContainer sContainer: containers) {
			this.containers.add(sContainer);
			if(sContainer instanceof AbstractSpiderAsiderPanel){
				/**
				 * 添加左侧边栏
				 */
				super.setLeftComponent((AbstractSpiderAsiderPanel)sContainer);
			}else if(sContainer instanceof AbstractSpiderMainPanel){
				super.setRightComponent((AbstractSpiderMainPanel)sContainer);
			}
		}
		
	}


}
